package com.superzqb.asus.superzqbFragment.superzqbSave;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.superzqb.asus.superzqb.R;
import com.superzqb.asus.superzqbFragment.superzqbSave.Adapter.WelfareAdapter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class Welfare extends Activity implements View.OnClickListener{
    private ImageView back;
    private ListView lv;
    private TextView title;
    ArrayList<Map<String, Object>> listitem =
            new ArrayList<Map<String, Object>>();
    private WelfareAdapter adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.welfare);
        initView();
        getData();
        adapter=new WelfareAdapter(Welfare.this,listitem);
        lv.setAdapter(adapter);
    }

    private void initView() {
        back=(ImageView)findViewById(R.id.back);
        title=(TextView) findViewById(R.id.title);
        title.setText("攒客福利");
        lv=(ListView)findViewById(R.id.listView);
        back.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.back:
                finish();
                break;
            default:break;
        }

    }
    public void getData() {
        listitem.clear();
        for (int i = 0; i < 1; i++) {
            Map<String,Object> map=new HashMap<String, Object>();
            map.put("info1","开启一波攒钱经历");
            map.put("info2","可领取网络兼职");
            listitem.add(map);
        }
    }
}
